<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/layout/template.xhtml">
	<ui:define name="body">
	<script language="JavaScript" type="text/javascript">
		window.history.forward(-1);
	</script>
		<h1 class="title ui-widget-header ui-corner-all">Lista de Comprobantes</h1>
		<h:form id="frmComprobanteFormList" prependId="false">
			<p:growl id="message" showDetail="true" />
			<p:dataTable value="#{comprobanteSearch.comprobanteList}" var="c"
				id="comproTable" paginator="true" rows="10"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="5,10,15" widgetVar="table"
					emptyMessage="No se encontro registros">

				<f:facet name="header">
					<h:outputLabel
						value="#{message['lista.mantenimiento.empresa.titulo']}" />
				</f:facet>
				
				<p:column headerText="#{message['comprobante.codigo']}" >
					<h:outputText value="#{c.codcomprobante}" />
				</p:column>

				<p:column headerText="#{message['comprobante.tipo']}" >
					<h:outputText value="#{c.tipocomprobante}" />
				</p:column>

				<p:column headerText="#{message['comprobante.verDetalle']}" >
					<p:commandButton value="#{message['comprobante.detalle']}"  
						action="#{comprobanteForm.update}"	icon="ui-icon ui-icon-pencil">
						<f:setPropertyActionListener value="#{c}"
							target="#{comprobanteForm.objComprobanteSie}" />
					</p:commandButton>
				</p:column>
				
			</p:dataTable>
		</h:form>
	</ui:define>
</ui:composition>